function checkPic(id) {
		var picPath = document.getElementById(id).value;
		var type = picPath.substring(picPath.lastIndexOf(".") + 1, picPath.length).toLowerCase();
		if (type != "jpg" && type != "bmp" && type != "gif" 
			&& type != "png" && type != "jpeg") {
			alert("***请上传正确的图片格式");
			return false;
		}
		return true;
}
	
	function PreviewImage(id,divImage, upload, width, height){
		if(checkPic(id)){
			var imgPath;
			var Browser_Agent = navigator.userAgent;
			if (Browser_Agent.indexOf("Firefox") != -1 || Browser_Agent.indexOf("Chrome") != -1) {
				imgPath = URL.createObjectURL(upload.files[0]);
				document.getElementById(divImage).innerHTML = "<img id='imgPreview' src='"+ imgPath+ "' width='"
							+ width+ "' height='"+ height+ "'/>";
			} else {
				var Preview = document.getElementById(divImage);
				Preview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = upload.value;
			}
		}
	};